package grape.attend.rest.user.vo;
import grape.base.service.dict.api.IDictService;
import grape.common.rest.vo.BaseIdVo;

import grape.common.service.trans.TransBy;
import grape.common.service.trans.TransField;
import grape.common.service.trans.impl.DatetimeTransServiceImpl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 用户请/补假单表
 * </p>
 *
 * @author yangwei
 * @since 2020-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="用户请/补假单表数据响应对象")
public class UserLeaveApplicationVo extends BaseIdVo<String> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "流水号，请假单号")
    private String serialNo;

    @ApiModelProperty(value = "审批状态，字典id")
    private String approveStatusDictId;

    @TransBy(type = IDictService.trans_dictName,byFieldName = "approveStatusDictId")
    @ApiModelProperty(value = "审批状态字典名称")
    private String approveStatusDictName;

    @ApiModelProperty(value = "是否请假，否则补假")
    private Boolean isAskForLeave;

    @ApiModelProperty(value = "审批提交时间")
    private Long approveSubmitAt;

    @TransBy(type = DatetimeTransServiceImpl.trans_datetime,byFieldName = "approveSubmitAt")
    @ApiModelProperty(value = "审批提交时间")
    private String approveSubmitAtTxt;

    @ApiModelProperty(value = "审批结束时间")
    private Long approveFinishAt;

    @TransBy(type = DatetimeTransServiceImpl.trans_datetime,byFieldName = "approveFinishAt")
    @ApiModelProperty(value = "审批结束时间")
    private Long approveFinishAtTxt;

    @ApiModelProperty(value = "原因、理由")
    private String reason;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TransField
    @ApiModelProperty(value = "请假单明细")
    List<UserLeaveVo> userLeaves;

}
